370 LOCATE 23,5:PRINT "USE THE ENTER KEY TO MOVE FROM ONE FIELD TO ANOTHER."
380 LOCATE 24,5:PRINT "SAVE AN ENTRY ON THE SCREEN BEFORE GOING TO THE MENU.";
390 LOCATE 1,1:PRINT USING "BUFFER AT ## OF ###";BUFFER,SIZE;
400 GOTO 440
410 INPUT "",A$
420 IF R=5 AND A$="S" THEN COLOR 7,0,0: GOTO 490
430 IF R=5 AND A$="M" THEN COLOR 7,0,0: GOTO 800
440 READ R,C
450 COLOR 15,0,0
460 IF R=0 AND C=0 THEN RESTORE:READ R,C
470 LOCATE R,C
480 GOTO 410
490 '############################ BEGINNING OF READ SCREEN ROUTINE ###########
500 DESC$="":X$="" ' RESET VARIABLES
510 FLAG1=1 ' RESET BUFFER DUMP VARIABLE
520 FOR I=41 TO 80
530 X=SCREEN(8,I) ' READ THE SCREEN AT 8,41-80 ONE CHAR AT A TIME
540 X$=CHR$(X)' CHANGE THE CHAR CODE TO A LETTER
550 DESC$=DESC$+X$' BUILD THE WORD FROM THE CHARACTERS
560 NEXT' GO TO THE NEXT CHARACTER
570 FOR I=1 TO 20
580 X=SCREEN(9,I) ' READ THE SCREEN AT 9,1-20 ONE CHAR AT A TIME
590 X$=CHR$(X)' CHANGE THE CHAR CODE TO A LETTER
600 DESC$=DESC$+X$' BUILD THE WORD FROM THE CHARACTERS
610 NEXT' GO TO THE NEXT CHARACTER
620 NUM$="":X$=""' THE REST USE THE SAME LOGIC
630 FOR I=37 TO 40
640 X=SCREEN(12,I)
650 X$=CHR$(X)
660 NUM$=NUM$+X$
670 NEXT
680 NUM=VAL(NUM$)
690 DOLLAR$="":X$=""
700 FOR I=57 TO 63
710 X=SCREEN(14,I)
720 X$=CHR$(X)
730 DOLLAR$=DOLLAR$+X$
740 NEXT
750 DOLLAR=VAL(DOLLAR$)
760 ROOM=SCREEN(16,42)
770 ROOM=VAL(CHR$(ROOM))
780 DES$(BUFFER)=DESC$:NO(BUFFER)=NUM:DOL(BUFFER)=DOLLAR:RM(BUFFER)=ROOM' BUILD A BUFFER TO SAVE TIME IN ENTERING
790 IF BUFFER=SIZE THEN 800 ELSE 230' IS IT FULL?
800 IF FLAG1=0 THEN 900' HAS THE BUFFER BEEN DUMPED? 0 FOR YES, 1 FOR NO
810 WIDTH 40:LOCATE 12,10: PRINT "HOLD FOR DISK OPERATION"
820 OPEN "INVENTRY.DAT" FOR APPEND AS #1
830 IF A$="M" OR A$="m" THEN BUFFER = BUFFER - 1' MENU OPTION ADDS TO COUNTER WITHOUT ADDING TO ARRAY
840 FOR B=1 TO BUFFER
850 WRITE#1, DES$(B);NO(B),DOL(B),RM(B)
860 DES$(B)="":NO(B)=0:DOL(B)=0:RM(B)=0
870 NEXT
880 CLOSE:WIDTH 80: BUFFER=0: FLAG1=0' RESET
890 IF A$="S" OR A$="s" THEN 230 ELSE 900
900 REM -----------------MASTER MENU-----------------
910 WIDTH 80:CLS
920 BUFFER=0
930 COLOR 15,0,0
940 LOCATE 5,29: PRINT "HOME INVENTORY PROGRAM";
950 COLOR 7,0,0
960 LOCATE 6,37:PRINT "by"
970 LOCATE 7,31:PRINT "BRIAN D. MANN"
980 COLOR 15,0,0
990 LOCATE 10,32: PRINT "MASTER MENU";
1000 COLOR 7,0,0
1010 LOCATE 12,10: PRINT "DO YOU WISH TO ==>"
1020 LOCATE 14,20: PRINT "1. FILE AN ITEM IN THE INVENTORY.":LOCATE 16,20:PRINT "2. PRINT THE ITEMS ALREADY FILED.":LOCATE 18,20:PRINT "3. DELETE AN ENTRY"
1170 LOCATE 14,20: PRINT "1. PRINT THE LISTED ITEMS TO THE SCREEN.":LOCATE 16,20:PRINT "2. PRINT THE LISTED ITEMS TO THE PRINTER.":LOCATE 18,20:PRINT "3. RETURN TO THE MASTER MENU."
1180 LOCATE 12,30: INPUT "",P1
1190 SUB=0
1200 IF P1=1 THEN 1240
1210 IF P1=2 THEN 1240
1220 IF P1=3 THEN 900
1230 BEEP: GOTO 1180
1240 CLS
1250 I1=0
1260 ON ERROR GOTO 1920
1270 OPEN "INVENTRY.DAT" FOR INPUT AS #1
1280 IF EOF(1) THEN CLOSE: GOTO 1650
1290 I1=I1+1
1300 INPUT#1,DESC$,NUM,DOLLAR,ROOM
1310 IF ROOM=1 THEN ROOM$="LIVING ROOM":GOTO 1400
1320 IF ROOM=2 THEN ROOM$="KITCHEN/DINING ROOM":GOTO 1400
1330 IF ROOM=3 THEN ROOM$="DOWNSTAIRS BATHROOM":GOTO 1400
1340 IF ROOM=4 THEN ROOM$="UPSTAIRS BATHROOM":GOTO 1400
1350 IF ROOM=5 THEN ROOM$="MASTER BEDROOM":GOTO 1400
1360 IF ROOM=6 THEN ROOM$="STUDY":GOTO 1400
1370 IF ROOM=7 THEN ROOM$="ATTIC":GOTO 1400
1380 IF ROOM=8 THEN ROOM$="OUTSIDE":GOTO 1400
1390 ROOM$="UNSPECIFIED"
1400 SUBTTL=NUM*DOLLAR
1410 SUB=SUB+SUBTTL' KEEP UP WITH ACCUMULATED WORTH
1420 IF P1=2 THEN GOTO 1470
1430 PRINT USING "### & REPLACEMENT COST=$####.## NUM. OF ITEMS= ### SUBTOTAL= ####.## LOCATION:&";I1;DESC$;DOLLAR;NUM;DOLLAR*NUM;ROOM$
1440 PRINT
1450 IF I1/7=INT(I1/7) THEN LOCATE 24,40:INPUT "PRESS ENTER TO CONTINUE";Z$
1460 GOTO 1280
1470 REM ############################# OUTPUT TO PRINTER #####################
1480 CLS
1490 IF I1 <>1 THEN 1600
1500 INPUT "WHAT IS THE DATE (IN THE FORM 08/12/82) ==>";DAT$
1510 INPUT "SET THE TOP OF FORM ON THE PRINTER AND PRESS ENTER WHEN READY";Z$
1520 WIDTH "LPT1:",132
1530 LPRINT CHR$(27) "0":LPRINT CHR$(27) "C" CHR$(88)'SET 8LINES/INCH AND 88 LINE FORM IT IS IMPORTANT THAT THIS IS DONE BEFORE ANYTHING IS PRINTED